<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<div id="app">
		<div>
			<button v-on:click="clicks">点我刷新</button>
		</div>
		<div v-for="jjj in temp">
			{{jjj}}
		</div>
	</div>
	<script type="text/javascript" src="js/jquery.min.js" ></script>
	<script type="text/javascript" src="js/vue.min.js" ></script>
	<script>
		new Vue({
			el:"#app",
			data:{
				tap:'',
				temp:[],
				intCount:0
			},
			mounted:function(){
			},
			methods:{
				clicks:function(){
					var vm = this;
					vm.intCount = vm.intCount+1;
					$.ajax({
						type:"get",
						url:"test.json",
						async:true,
						success:function(data){
							if (data.testData) {
								for (var i = 0; i < data.testData.length; i++) {
									if (data.testData[i].tap||data.testData[i].temp) {
										if (data.testData[i].tap== vm.intCount) {
											vm.temp = data.testData[i].temp;
										}
									}
								}
							}
						}
					});
				}
			}
		})
	</script>
	</body>
</html>
